﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZhonTai.Admin.Services.Patrol.TaskDto
{
    public class PatrolTaskAddInput
    {
        /// <summary>
        /// 任务名称
        /// </summary>
        public string TaskName { set; get; }
        /// <summary>
        /// 任务类型
        /// </summary>
        public string TaskType { set; get; }
        /// <summary>
        /// 任务来源
        /// </summary>
        public string TaskSource { set; get; }
        /// <summary>
        /// 是否自动关闭
        /// 如自动关闭：当任务配置下的内容已经完成或已过期，否则用不关闭，可重复执行
        /// </summary>
        public bool IsAutoClosed { set; get; }
        /// <summary>
        /// 任务节点Id
        /// </summary>
        public long TaskNodeId { set; get; }
    }

    public class PatrolTaskConfigInput
    {
        /// <summary>
        /// 表单Id
        /// 问题：是否存在多个表单
        /// </summary>
        public long FormId { set; get; }

        /// <summary>
        /// 执行人
        /// </summary>
        public long[] Users { set; get; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? StartTime { set; get; }

        /// <summary>
        /// 截至时间
        /// </summary>
        public DateTime? EndTime { set; get; }
    }

    public class PatrolTaskConfigInputs
    {
        public long TaskId { set; get; }

        public ICollection<PatrolTaskConfigInput> Configs { set; get; }
    }

    public class PatrolTaskGetPageDto
    {
        /// <summary>
        /// 部门Id
        /// </summary>
        public long? OrgId { get; set; }
    }

    /// <summary>
    /// 任务执行过程
    /// </summary>
    public class PatrolTaskProcessDto
    {
        public long Id { set; get; }

        /// <summary>
        /// 总里程
        /// </summary>
        public float Mileage { set; get; }
        /// <summary>
        /// 总时长
        /// </summary>
        public float Duration { set; get; }
    }

    /// <summary>
    /// 事件点
    /// </summary>
    public class PatrolTaskNodeDto
    {
        public long TaskId { set; get; }

        public long TaskConfigId { set; get; }

        public long TaskProcessId { set; get; }

        public double Lon { set; get; }


        public double Lat { set; get; }

        /// <summary>
        /// 表单Id
        /// </summary>
        public long FormId { set; get; }

        public string FormName { set; get; }
        /// <summary>
        /// 发现时间
        /// </summary>
        public DateTime FindTime { set; get; }

        /// <summary>
        /// 子项
        /// </summary>
        public IDictionary<string,object> Items { set; get; }
    }
}
